<%
//用户
var user = shiro.getUser();
var title  = '食药局申请';
layout("/inc/layout.html",{
title:title,
keywords:title,
description:title,
style:'user.css'
}){
%>
<section class="container">
    <div class="row mt15">
        <div class="panel panel-info">
            			<div class="panel-heading text-left">
				<ul class="nav nav-tabs">
					<li><a href="/fooddrugApply/base"><b>食品经营许可证办理</b></a></li>
					<li  class="active"><a href="/fooddrugChange/index"><b>食品经营许可证变更</b></a></li>
					<li><a href="/fooddrugCancel/base"><b>食品经营许可证注销</b></a></li>
				</ul>
			</div>
            <div class="panel-body">
                <!--项目状态-->
  <legend><span class="text text-danger" id="messageCode">申报材料</span></legend>
                <form class="form-horizontal col-sm-offset-1 col-sm-9" id="saveBaseForm" method="post" action="/fooddrugChange/saveBase">
               <input type="hidden" name="id" id="id" value="${id!}">
               <input type="hidden" name="applyId" id="applyId" value="${applyId!}">
                    <div class="form-group">
                        <label for="companyName" class="col-sm-2 control-label">企业名称：</label>
                        <div class="col-sm-10">               
                            <input type="text" class="form-control" id="companyName" name="companyName" value="${companyName!}" placeholder="企业名称"
                                   required="required"> 
                                    <b class="text text-danger" id="companyName-error"></b>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="companyLicenseUploader" class="col-sm-2 control-label">营业执照：</label>
                        <div class="col-sm-10" id="companyLicense-box">
                            <input type="file" class="form-control" id="companyLicenseUploader" name="files" data-max-file-count="5" multiple="multiple">
                            <b class="text text-danger" id="companyLicense-error"></b>
                             <hr></hr>
                            <span class="companyLicense-block" id="companyLicense-upload-error"></span>
                            <span class="companyLicense-block row" id="companyLicense-upload-success">
                                <%
                                if(isNotEmpty(companyLicenseList)){
                                  for(companyLicensepic in companyLicenseList){
                                 %>
                                <div class="col-xs-12 col-sm-6 col-md-3 mb10">
                                    <div class="thumbnail uploadImageShow">
                                        <input type="hidden" name="companyLicenseList" value="${companyLicensepic!}">
                                        <a href="${uploaderFilesDomain!}${companyLicensepic!}" target="_blank">
                                            <img src="${uploaderFilesDomain!}${companyLicensepic!}">
                                        </a>
                                        <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove();">删除</div>
                                    </div>
                                </div>
                                <%
                                }
                                 }
                                %>
                            </span>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="rentalContractUploader" class="col-sm-2 control-label">租赁合同：</label>
                        <div class="col-sm-10" id="rentalContract-box">
                            <input type="file" class="form-control" id="rentalContractUploader" name="files" data-max-file-count="5" multiple="multiple">
                            <b class="text text-danger" id="rentalContract-error"></b>
                            <hr></hr>
                            <span class="rentalContract-block" id="rentalContract-upload-error"></span>
                            <span class="rentalContract-block row" id="rentalContract-upload-success">
                                <%
                                if(isNotEmpty(rentalContractList)){
                                  for(rentalContractpic in rentalContractList){
                                 %>
                                <div class="col-xs-12 col-sm-6 col-md-3 mb10">
                                    <div class="thumbnail uploadImageShow">
                                        <input type="hidden" name="rentalContractList" value="${rentalContractpic!}">
                                        <a href="${uploaderFilesDomain!}${rentalContractpic!}" target="_blank">
                                            <img src="${uploaderFilesDomain!}${rentalContractpic!}">
                                        </a>
                                        <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove();">删除</div>
                                    </div>
                                </div>
                                <%
                                }
                                 }
                                %>
                            </span>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label for="layoutUploader" class="col-sm-2 control-label">布局图：</label>
                        <div class="col-sm-10" id="layout-box">
                            <input type="file" class="form-control" id="layoutUploader" name="files" data-max-file-count="5" multiple="multiple">
                            <b class="text text-danger" id="layout-error"></b>
                            <hr></hr>
                            <span class="layout-block" id="layout-upload-error"></span>
                            <span class="layout-block row" id="layout-upload-success">
                                <%
                                if(isNotEmpty(layoutList)){
                                  for(layoutpic in layoutList){
                                 %>
                                <div class="col-xs-12 col-sm-6 col-md-3 mb10">
                                    <div class="thumbnail uploadImageShow">
                                        <input type="hidden" name="layoutList" value="${layoutpic!}">
                                        <a href="${uploaderFilesDomain!}${layoutpic!}" target="_blank">
                                            <img src="${uploaderFilesDomain!}${layoutpic!}">
                                        </a>
                                        <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove();">删除</div>
                                    </div>
                                </div>
                                <%
                                }
                                 }
                                %>
                            </span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="certUploader" class="col-sm-2 control-label">操作流程：</label>
                        <div class="col-sm-10" id="operatingProcedures-box">
                            <input type="file" class="form-control" id="operatingProceduresUploader" name="files" data-max-file-count="5" multiple="multiple">
                            <b class="text text-danger" id="operatingProcedures-error"></b>
                            <hr></hr>
                            <span class="operatingProcedures-block" id="operatingProcedures-upload-error"></span>
                            <span class="operatingProcedures-block row" id="operatingProcedures-upload-success">
                                <%
                                if(isNotEmpty(operatingProceduresList)){
                                  for(operatingProcedurespic in operatingProceduresList){
                                 %>
                                <div class="col-xs-12 col-sm-6 col-md-3 mb10">
                                    <div class="thumbnail uploadImageShow">
                                        <input type="hidden" name="operatingProceduresList" value="${operatingProcedurespic!}">
                                        <a href="${uploaderFilesDomain!}${operatingProcedurespic!}" target="_blank">
                                            <img src="${uploaderFilesDomain!}${operatingProcedurespic!}">
                                        </a>
                                        <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove();">删除</div>
                                    </div>
                                </div>
                                <%
                                }
                                 }
                                %>
                            </span>
                        </div>
                    </div>
                    
                      <div class="form-group">
                        <label for="orientationMapUploader" class="col-sm-2 control-label">方位图：</label>
                        <div class="col-sm-10" id="orientationMap-box">
                            <input type="file" class="form-control" id="orientationMapUploader" name="files" data-max-file-count="5" multiple="multiple">
                            <b class="text text-danger" id="orientationMap-error"></b>
                             <hr></hr>
                            <span class="orientationMap-block" id="orientationMap-upload-error"></span>
                            <span class="orientationMap-block row" id="orientationMap-upload-success">
                                <%
                                if(isNotEmpty(orientationMapList)){
                                  for(orientationMappic in orientationMapList){
                                 %>
                                <div class="col-xs-12 col-sm-6 col-md-3 mb10">
                                    <div class="thumbnail uploadImageShow">
                                        <input type="hidden" name="orientationMapList" value="${orientationMappic!}">
                                        <a href="${uploaderFilesDomain!}${orientationMappic!}" target="_blank">
                                            <img src="${uploaderFilesDomain!}${orientationMappic!}">
                                        </a>
                                        <div class="btn btn-block btn-danger deletetCover" onclick="$(this).parent().parent().remove();">删除</div>
                                    </div>
                                </div>
                                <%
                                }
                                 }
                                %>
                            </span>
                        </div>
                    </div>
                </form>
            </div>
             <div class="panel-footer">
                <div class="col-sm-offset-3 clearfix">
                    <div class="mt5 mb5 block col-sm-3">
                        <a href="/user/transact" class="btn btn-warning btn-lg btn-outline btn-block">我的办件</a>
                    </div>
                    <div class="mt5 mb5 block col-sm-3">
                        <button type="button" id="submitBase" class="btn btn-danger btn-lg btn-outline btn-block">下一步</button>
                    </div>
                </div>
        </div>
   </div>
  </div>
 </section>
<% } %>
<script>
require(['modules/fooddrug_base'], function (fooddrugBase) {
	fooddrugBase.info();
});
</script>
</body>
</html>